package com.itqf;

import com.itqf.service.UserService;
import com.itqf.service.impl.UserServiceImpl;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @Description:
 * @Company: 千锋互联
 * @Author: 李丽婷
 * @Date: 2020/11/9
 * @Time: 下午3:59
 */
public class TestBean {

    public  static  void  main(String[]args){
        ClassPathXmlApplicationContext ac = new ClassPathXmlApplicationContext("applicationContext-bean.xml");
        System.out.println("--------------");


        UserService userService = (UserServiceImpl)ac.getBean("userService");
        UserService userService1 = (UserServiceImpl)ac.getBean("userService");

        System.out.println(userService+"--"+userService1);
        System.out.println(userService==userService1);

        System.out.println("--------------");
        userService.update();


    }

}
